﻿<UserControl x:Class="LiveTiss.Guias.UserControls.Contratado"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:uc="clr-namespace:LiveTiss.Guias.UserControls"  
    xmlns:converter="clr-namespace:LiveTiss.Classes.TypeConverter"
    mc:Ignorable="d" Width="910" x:Name="ucContratado">
    
    <UserControl.Resources>
        <converter:BoolToVisibilityConverter x:Key="Converter" />
    </UserControl.Resources>

    <StackPanel Width="910">
        <uc:IdentificacaoPrestadorExecutante Value="{Binding Path=Value.identificacao, ElementName=ucContratado, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"  />
        <Grid Width="890" Height="53" Margin="0,0,6,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Nome do Contratado:" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox Name="txtNomeContratado" Margin="0,6,323,0" MaxLength="70" 
                                 Text="{Binding Path=Value.nomeContratado, ElementName=ucContratado, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
            </StackPanel>
            <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
        </Grid>
        <Grid Width="890" Height="53" Margin="0,0,6,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Código CNES:" FontFamily="Segoe UI" FontSize="13.333"/>
                <TextBox Name="txtCodigoCNES" Margin="0,6,323,0" MaxLength="7" 
                                 Text="{Binding Path=Value.numeroCNES, ElementName=ucContratado, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"   />
            </StackPanel>
        </Grid>
        <Grid Width="890" Margin="0,0,6,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Margin="0" Grid.Column="2">
                <CheckBox Name="cbxEndereco" Content="Endereço:" FontFamily="Segoe UI" FontSize="13.333" />
            </StackPanel>
        </Grid>
        <uc:Endereco x:Name="endContratado" Value="{Binding Path=Value.enderecoContratado, ElementName=ucContratado, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" 
            Visibility="{Binding Path=IsChecked,ElementName=cbxEndereco,Converter={StaticResource Converter}}" />
    </StackPanel>
</UserControl>
